package com.kili.file.config.factory.subabstract;

import com.kili.file.config.factory.FactoryBeanWired;
import com.kili.file.service.impl.FileUploadWithLocalStorage;
import lombok.extern.slf4j.Slf4j;
import java.util.Objects;

/**
 * local-processed, non-file uploading other operations for abstract
 *
 * @param
 */
@Slf4j
public abstract class AbstractLocalFactoryBean<T, E> implements FactoryBeanWired<T, E> {

    @Override
    public T runHandler(E e) {
        Objects.requireNonNull(e);
        log.trace("This is core Non-fileUpload business processing");
        return this.coreWithHandler(e);
    }
    protected static final FileUploadWithLocalStorage fileUploadWithLocalStorage = new FileUploadWithLocalStorage();

    /**
     * abstract core business
     *
     * @param e
     * @return
     */
    public abstract T coreWithHandler(E e);
}
